import axios from 'axios';

const apiBaseUrl = 'http://localhost:5173/api';

export const playlistService = {
  /**
   * 发起添加歌单到用户歌单列表的请求
   * @param {number} playlistId 歌单的 ID
   * @returns {Promise<Object>} 包含添加结果的响应数据
   */
  async addPlaylist(playlistId) {
    const response = await axios.post(`${apiBaseUrl}/playlist/add/${playlistId}`);
    return response.data;
  }
};
